Skip to content

Instantly share code, notes, and snippets.

@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active May 8, 2024 22:32 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->
@Aldaviva
Aldaviva / wmp_h.265_hevc.md
Last active May 8, 2024 22:30
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the x64 appx file, or whatever your Windows architecture is.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .appx filename and save it as that instead.
@vanga
vanga / create-self-signed-certs.sh
Created September 8, 2022 14:41
Create self signed certificates using Elasticsearch util scripts
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.1-linux-x86_64.tar.gz
tar -zxf elasticsearch-8.4.1-linux-x86_64.tar.gz
cd elasticsearch-8.4.1/
./bin/elasticsearch-certutil ca --pem
unzip elastic-stack-ca.zip
./bin/elasticsearch-certutil cert --ca-cert ca/ca.crt --ca-key ca/ca.key --pem --name elk.example.com
unzip certificate-bundle.zip
cd ../
@johnathanmay
johnathanmay / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active May 8, 2024 22:25
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation:

@geovannaotoni
geovannaotoni / docker.md
Last active May 8, 2024 22:25
Comandos Docker

Principais Comandos do Docker via CLI

Gerenciando Imagens

  • docker images: visualizar todas as imagens Docker presentes na máquina;
  • docker pull <nome-da-imagem>:<tag>?: baixar uma imagem do Docker Hub sem necessariamente executar esta imagem como um container;
  • docker rmi <nome/id-da-imagem>: remover uma imagem Docker (acrônimo das palavras ReMover Imagem);
  • docker build: construir uma imagem a partir de um Dockerfile;

Gerenciando Container

  • docker <comando> <subcomando> <parâmetros>: (Os <parâmetros> são opcionais na execução dos comandos);
@ax3l
ax3l / noglobal.py
Last active May 8, 2024 22:23
Useful Noglobal in Python
# License:
# I hereby state this snippet is below "threshold of originality" where applicable (public domain).
#
# Otherwise, since initially posted on Stackoverflow, use as:
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl
# http://stackoverflow.com/a/31047259/2719194
# http://stackoverflow.com/a/4858123/2719194
import types
@edonosotti
edonosotti / formula.md
Created March 19, 2018 12:04
Microsoft Excel formula to convert ISO 8601 date with milliseconds resolution to time stamp

Formula

This will convert an ISO 8601 date such as: 2018-03-19T10:18:08.137747874Z

to a timestamp with milliseconds resolution: 1521454688137,00

Please note that the decimal part (,00) can be stripped away, milliseconds are the last three digits.

=(((DATEVALUE(LEFT(A1;10))+TIMEVALUE(MID(A1;12;8)))-DATE(1970;1;1))*86400000)+VALUE(MID(A1;FIND(".";A1)+1;3))
@yanknudtskov
yanknudtskov / functions.php
Created June 4, 2019 07:31
get_posts meta_query example
<?php
$posts = get_posts( array(
'numberposts' => -1,
'post_type' => 'student',
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'acf_student_group',
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 22:14
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",